<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/xhtml;charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=9" http-equiv="X-UA-Compatible"/>
<meta content="Doxygen 1.8.13" name="generator"/>
<title>OpenCV: cv::VideoCapture Class Reference</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script src="../../jquery.js" type="text/javascript"></script>
<script src="../../dynsections.js" type="text/javascript"></script>
<script src="../../tutorial-utils.js" type="text/javascript"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script src="../../search/searchdata.js" type="text/javascript"></script>
<script src="../../search/search.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js" type="text/javascript"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellpadding="0" cellspacing="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
    <span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script src="../../menudata.js" type="text/javascript"></script>
<script src="../../menu.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow" onkeydown="return searchBox.OnSearchSelectKey(event)" onmouseout="return searchBox.OnSearchSelectHide()" onmouseover="return searchBox.OnSearchSelectShow()">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe frameborder="0" id="MSearchResults" name="MSearchResults" src="javascript:void(0)">
</iframe>
</div>
<div class="navpath" id="nav-path">
  <ul>
<li class="navelem"><a class="el" href="../../d2/d75/namespacecv.html">cv</a></li><li class="navelem"><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html">VideoCapture</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-static-methods">Static Public Member Functions</a> |
<a href="#pro-attribs">Protected Attributes</a> |
<a href="#friends">Friends</a> |
<a href="../../d0/d71/classcv_1_1VideoCapture-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">cv::VideoCapture Class Reference<div class="ingroups"><a class="el" href="../../dd/de7/group__videoio.html">Video I/O</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<p>Class for video capturing from video files, image sequences or cameras.  
 <a href="../../d8/dfe/classcv_1_1VideoCapture.html#details">More...</a></p>
<p><code>#include &lt;opencv2/videoio.hpp&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a57c0e81e83e60f36c83027dc2a188e80"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#a57c0e81e83e60f36c83027dc2a188e80">VideoCapture</a> ()</td></tr>
<tr class="memdesc:a57c0e81e83e60f36c83027dc2a188e80"><td class="mdescLeft"> </td><td class="mdescRight">Default constructor.  <a href="#a57c0e81e83e60f36c83027dc2a188e80">More...</a><br/></td></tr>
<tr class="separator:a57c0e81e83e60f36c83027dc2a188e80"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac4107fb146a762454a8a87715d9b7c96"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#ac4107fb146a762454a8a87715d9b7c96">VideoCapture</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;filename, int apiPreference=<a class="el" href="../../d4/d15/group__videoio__flags__base.html#gga023786be1ee68a9105bf2e48c700294da77ab1fe260fd182f8ec7655fab27a31d">CAP_ANY</a>)</td></tr>
<tr class="memdesc:ac4107fb146a762454a8a87715d9b7c96"><td class="mdescLeft"> </td><td class="mdescRight">Opens a video file or a capturing device or an IP video stream for video capturing with API Preference.  <a href="#ac4107fb146a762454a8a87715d9b7c96">More...</a><br/></td></tr>
<tr class="separator:ac4107fb146a762454a8a87715d9b7c96"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a31e7cf5ba9debaec15437a200b18241e"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#a31e7cf5ba9debaec15437a200b18241e">VideoCapture</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;filename, int apiPreference, const std::vector&lt; int &gt; &amp;params)</td></tr>
<tr class="memdesc:a31e7cf5ba9debaec15437a200b18241e"><td class="mdescLeft"> </td><td class="mdescRight">Opens a video file or a capturing device or an IP video stream for video capturing with API Preference and parameters.  <a href="#a31e7cf5ba9debaec15437a200b18241e">More...</a><br/></td></tr>
<tr class="separator:a31e7cf5ba9debaec15437a200b18241e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aabce0d83aa0da9af802455e8cf5fd181"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#aabce0d83aa0da9af802455e8cf5fd181">VideoCapture</a> (int index, int apiPreference=<a class="el" href="../../d4/d15/group__videoio__flags__base.html#gga023786be1ee68a9105bf2e48c700294da77ab1fe260fd182f8ec7655fab27a31d">CAP_ANY</a>)</td></tr>
<tr class="memdesc:aabce0d83aa0da9af802455e8cf5fd181"><td class="mdescLeft"> </td><td class="mdescRight">Opens a camera for video capturing.  <a href="#aabce0d83aa0da9af802455e8cf5fd181">More...</a><br/></td></tr>
<tr class="separator:aabce0d83aa0da9af802455e8cf5fd181"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a708eea6c0dc7b57d04b27818ab8fc245"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#a708eea6c0dc7b57d04b27818ab8fc245">VideoCapture</a> (int index, int apiPreference, const std::vector&lt; int &gt; &amp;params)</td></tr>
<tr class="memdesc:a708eea6c0dc7b57d04b27818ab8fc245"><td class="mdescLeft"> </td><td class="mdescRight">Opens a camera for video capturing with API Preference and parameters.  <a href="#a708eea6c0dc7b57d04b27818ab8fc245">More...</a><br/></td></tr>
<tr class="separator:a708eea6c0dc7b57d04b27818ab8fc245"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae82ac8efcff2c5c96be47c060754a518"><td align="right" class="memItemLeft" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#ae82ac8efcff2c5c96be47c060754a518">~VideoCapture</a> ()</td></tr>
<tr class="memdesc:ae82ac8efcff2c5c96be47c060754a518"><td class="mdescLeft"> </td><td class="mdescRight">Default destructor.  <a href="#ae82ac8efcff2c5c96be47c060754a518">More...</a><br/></td></tr>
<tr class="separator:ae82ac8efcff2c5c96be47c060754a518"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa6480e6972ef4c00d74814ec841a2939"><td align="right" class="memItemLeft" valign="top">virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#aa6480e6972ef4c00d74814ec841a2939">get</a> (int propId) const</td></tr>
<tr class="memdesc:aa6480e6972ef4c00d74814ec841a2939"><td class="mdescLeft"> </td><td class="mdescRight">Returns the specified <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html" title="Class for video capturing from video files, image sequences or cameras. ">VideoCapture</a> property.  <a href="#aa6480e6972ef4c00d74814ec841a2939">More...</a><br/></td></tr>
<tr class="separator:aa6480e6972ef4c00d74814ec841a2939"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4576e03f447abfdbd602c0809824ec03"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#a4576e03f447abfdbd602c0809824ec03">getBackendName</a> () const</td></tr>
<tr class="memdesc:a4576e03f447abfdbd602c0809824ec03"><td class="mdescLeft"> </td><td class="mdescRight">Returns used backend API name.  <a href="#a4576e03f447abfdbd602c0809824ec03">More...</a><br/></td></tr>
<tr class="separator:a4576e03f447abfdbd602c0809824ec03"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac6e896380f408975cfc26d1931b95070"><td align="right" class="memItemLeft" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#ac6e896380f408975cfc26d1931b95070">getExceptionMode</a> ()</td></tr>
<tr class="memdesc:ac6e896380f408975cfc26d1931b95070"><td class="mdescLeft"> </td><td class="mdescRight">query if exception mode is active  <a href="#ac6e896380f408975cfc26d1931b95070">More...</a><br/></td></tr>
<tr class="separator:ac6e896380f408975cfc26d1931b95070"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae38c2a053d39d6b20c9c649e08ff0146"><td align="right" class="memItemLeft" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#ae38c2a053d39d6b20c9c649e08ff0146">grab</a> ()</td></tr>
<tr class="memdesc:ae38c2a053d39d6b20c9c649e08ff0146"><td class="mdescLeft"> </td><td class="mdescRight">Grabs the next frame from video file or capturing device.  <a href="#ae38c2a053d39d6b20c9c649e08ff0146">More...</a><br/></td></tr>
<tr class="separator:ae38c2a053d39d6b20c9c649e08ff0146"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9d2ca36789e7fcfe7a7be3b328038585"><td align="right" class="memItemLeft" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#a9d2ca36789e7fcfe7a7be3b328038585">isOpened</a> () const</td></tr>
<tr class="memdesc:a9d2ca36789e7fcfe7a7be3b328038585"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if video capturing has been initialized already.  <a href="#a9d2ca36789e7fcfe7a7be3b328038585">More...</a><br/></td></tr>
<tr class="separator:a9d2ca36789e7fcfe7a7be3b328038585"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a614a1702e15f42ede5100014ce7f48ed"><td align="right" class="memItemLeft" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#a614a1702e15f42ede5100014ce7f48ed">open</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;filename, int apiPreference=<a class="el" href="../../d4/d15/group__videoio__flags__base.html#gga023786be1ee68a9105bf2e48c700294da77ab1fe260fd182f8ec7655fab27a31d">CAP_ANY</a>)</td></tr>
<tr class="memdesc:a614a1702e15f42ede5100014ce7f48ed"><td class="mdescLeft"> </td><td class="mdescRight">Opens a video file or a capturing device or an IP video stream for video capturing.  <a href="#a614a1702e15f42ede5100014ce7f48ed">More...</a><br/></td></tr>
<tr class="separator:a614a1702e15f42ede5100014ce7f48ed"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac9e6045e168938b82bfc5ed0164e0481"><td align="right" class="memItemLeft" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#ac9e6045e168938b82bfc5ed0164e0481">open</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;filename, int apiPreference, const std::vector&lt; int &gt; &amp;params)</td></tr>
<tr class="memdesc:ac9e6045e168938b82bfc5ed0164e0481"><td class="mdescLeft"> </td><td class="mdescRight">Opens a camera for video capturing.  <a href="#ac9e6045e168938b82bfc5ed0164e0481">More...</a><br/></td></tr>
<tr class="separator:ac9e6045e168938b82bfc5ed0164e0481"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a49e87ea8665f471b76a48c0a6c537fb7"><td align="right" class="memItemLeft" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#a49e87ea8665f471b76a48c0a6c537fb7">open</a> (int index, int apiPreference=<a class="el" href="../../d4/d15/group__videoio__flags__base.html#gga023786be1ee68a9105bf2e48c700294da77ab1fe260fd182f8ec7655fab27a31d">CAP_ANY</a>)</td></tr>
<tr class="memdesc:a49e87ea8665f471b76a48c0a6c537fb7"><td class="mdescLeft"> </td><td class="mdescRight">Opens a camera for video capturing.  <a href="#a49e87ea8665f471b76a48c0a6c537fb7">More...</a><br/></td></tr>
<tr class="separator:a49e87ea8665f471b76a48c0a6c537fb7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a10867868137c2d142aac30a0648d00fe"><td align="right" class="memItemLeft" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#a10867868137c2d142aac30a0648d00fe">open</a> (int index, int apiPreference, const std::vector&lt; int &gt; &amp;params)</td></tr>
<tr class="memdesc:a10867868137c2d142aac30a0648d00fe"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if video capturing has been initialized already.  <a href="#a10867868137c2d142aac30a0648d00fe">More...</a><br/></td></tr>
<tr class="separator:a10867868137c2d142aac30a0648d00fe"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a199844fb74226a28b3ce3a39d1ff6765"><td align="right" class="memItemLeft" valign="top">virtual <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html">VideoCapture</a> &amp; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#a199844fb74226a28b3ce3a39d1ff6765">operator&gt;&gt;</a> (<a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;image)</td></tr>
<tr class="memdesc:a199844fb74226a28b3ce3a39d1ff6765"><td class="mdescLeft"> </td><td class="mdescRight">Stream operator to read the next video frame.  <a href="#a199844fb74226a28b3ce3a39d1ff6765">More...</a><br/></td></tr>
<tr class="separator:a199844fb74226a28b3ce3a39d1ff6765"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a35eb427f16b4ea5c502922aba9da835c"><td align="right" class="memItemLeft" valign="top">virtual <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html">VideoCapture</a> &amp; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#a35eb427f16b4ea5c502922aba9da835c">operator&gt;&gt;</a> (<a class="el" href="../../d7/d45/classcv_1_1UMat.html">UMat</a> &amp;image)</td></tr>
<tr class="separator:a35eb427f16b4ea5c502922aba9da835c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a473055e77dd7faa4d26d686226b292c1"><td align="right" class="memItemLeft" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#a473055e77dd7faa4d26d686226b292c1">read</a> (<a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> image)</td></tr>
<tr class="memdesc:a473055e77dd7faa4d26d686226b292c1"><td class="mdescLeft"> </td><td class="mdescRight">Grabs, decodes and returns the next video frame.  <a href="#a473055e77dd7faa4d26d686226b292c1">More...</a><br/></td></tr>
<tr class="separator:a473055e77dd7faa4d26d686226b292c1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afb4ab689e553ba2c8f0fec41b9344ae6"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#afb4ab689e553ba2c8f0fec41b9344ae6">release</a> ()</td></tr>
<tr class="memdesc:afb4ab689e553ba2c8f0fec41b9344ae6"><td class="mdescLeft"> </td><td class="mdescRight">Closes video file or capturing device.  <a href="#afb4ab689e553ba2c8f0fec41b9344ae6">More...</a><br/></td></tr>
<tr class="separator:afb4ab689e553ba2c8f0fec41b9344ae6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9ac7f4b1cdfe624663478568486e6712"><td align="right" class="memItemLeft" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#a9ac7f4b1cdfe624663478568486e6712">retrieve</a> (<a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> image, int flag=0)</td></tr>
<tr class="memdesc:a9ac7f4b1cdfe624663478568486e6712"><td class="mdescLeft"> </td><td class="mdescRight">Decodes and returns the grabbed video frame.  <a href="#a9ac7f4b1cdfe624663478568486e6712">More...</a><br/></td></tr>
<tr class="separator:a9ac7f4b1cdfe624663478568486e6712"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8c6d8c2d37505b5ca61ffd4bb54e9a7c"><td align="right" class="memItemLeft" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#a8c6d8c2d37505b5ca61ffd4bb54e9a7c">set</a> (int propId, double value)</td></tr>
<tr class="memdesc:a8c6d8c2d37505b5ca61ffd4bb54e9a7c"><td class="mdescLeft"> </td><td class="mdescRight">Sets a property in the <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html" title="Class for video capturing from video files, image sequences or cameras. ">VideoCapture</a>.  <a href="#a8c6d8c2d37505b5ca61ffd4bb54e9a7c">More...</a><br/></td></tr>
<tr class="separator:a8c6d8c2d37505b5ca61ffd4bb54e9a7c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afcab97adfa090883dce5523e9ebcb995"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#afcab97adfa090883dce5523e9ebcb995">setExceptionMode</a> (bool enable)</td></tr>
<tr class="separator:afcab97adfa090883dce5523e9ebcb995"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ade1c7b8d276fea4d000bc0af0f1017b3"><td align="right" class="memItemLeft" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#ade1c7b8d276fea4d000bc0af0f1017b3">waitAny</a> (const std::vector&lt; <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html">VideoCapture</a> &gt; &amp;streams, std::vector&lt; int &gt; &amp;readyIndex, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga7cde0074dfd288f2d70c0e035dacb28a">int64</a> timeoutNs=0)</td></tr>
<tr class="memdesc:ade1c7b8d276fea4d000bc0af0f1017b3"><td class="mdescLeft"> </td><td class="mdescRight">Wait for ready frames from <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html" title="Class for video capturing from video files, image sequences or cameras. ">VideoCapture</a>.  <a href="#ade1c7b8d276fea4d000bc0af0f1017b3">More...</a><br/></td></tr>
<tr class="separator:ade1c7b8d276fea4d000bc0af0f1017b3"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a8c6d7b52a28206072d540c9567874649"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../dc/d3d/videoio_8hpp.html#a394109074fab9bdca2ea45514b1946b7">CvCapture</a> &gt; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#a8c6d7b52a28206072d540c9567874649">cap</a></td></tr>
<tr class="separator:a8c6d7b52a28206072d540c9567874649"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad20c1542d32a3dfef0a083bede8b956a"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; IVideoCapture &gt; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#ad20c1542d32a3dfef0a083bede8b956a">icap</a></td></tr>
<tr class="separator:ad20c1542d32a3dfef0a083bede8b956a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8eb39d3c09569c6afe3dc9ef19253219"><td align="right" class="memItemLeft" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#a8eb39d3c09569c6afe3dc9ef19253219">throwOnFail</a></td></tr>
<tr class="separator:a8eb39d3c09569c6afe3dc9ef19253219"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:af1de3913d3e916106e718ebdf190f76e"><td align="right" class="memItemLeft" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#af1de3913d3e916106e718ebdf190f76e">internal::VideoCapturePrivateAccessor</a></td></tr>
<tr class="separator:af1de3913d3e916106e718ebdf190f76e"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a id="details" name="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Class for video capturing from video files, image sequences or cameras. </p>
<p>The class provides C++ API for capturing video from cameras or for reading video files and image sequences.</p>
<p>Here is how the class can be used: </p><div class="fragment"><div class="line"></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="../../d0/d9c/core_2include_2opencv2_2core_8hpp.html">opencv2/core.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="../../dc/d3d/videoio_8hpp.html">opencv2/videoio.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="../../d4/dd5/highgui_8hpp.html">opencv2/highgui.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;iostream&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;stdio.h&gt;</span></div><div class="line"></div><div class="line"><span class="keyword">using namespace </span><a class="code" href="../../d2/d75/namespacecv.html">cv</a>;</div><div class="line"><span class="keyword">using namespace </span><a class="code" href="../../d8/dcc/namespacestd.html">std</a>;</div><div class="line"></div><div class="line"><span class="keywordtype">int</span> main(<span class="keywordtype">int</span>, <span class="keywordtype">char</span>**)</div><div class="line">{</div><div class="line">    <a class="code" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> frame;</div><div class="line">    <span class="comment">//--- INITIALIZE VIDEOCAPTURE</span></div><div class="line">    <a class="code" href="../../d8/dfe/classcv_1_1VideoCapture.html">VideoCapture</a> <a class="code" href="../../d8/dfe/classcv_1_1VideoCapture.html#a8c6d7b52a28206072d540c9567874649">cap</a>;</div><div class="line">    <span class="comment">// open the default camera using default API</span></div><div class="line">    <span class="comment">// cap.open(0);</span></div><div class="line">    <span class="comment">// OR advance usage: select any API backend</span></div><div class="line">    <span class="keywordtype">int</span> deviceID = 0;             <span class="comment">// 0 = open default camera</span></div><div class="line">    <span class="keywordtype">int</span> apiID = <a class="code" href="../../d4/d15/group__videoio__flags__base.html#gga023786be1ee68a9105bf2e48c700294da77ab1fe260fd182f8ec7655fab27a31d">cv::CAP_ANY</a>;      <span class="comment">// 0 = autodetect default API</span></div><div class="line">    <span class="comment">// open selected camera using selected API</span></div><div class="line">    cap.<a class="code" href="../../d8/dfe/classcv_1_1VideoCapture.html#a614a1702e15f42ede5100014ce7f48ed">open</a>(deviceID, apiID);</div><div class="line">    <span class="comment">// check if we succeeded</span></div><div class="line">    <span class="keywordflow">if</span> (!cap.<a class="code" href="../../d8/dfe/classcv_1_1VideoCapture.html#a9d2ca36789e7fcfe7a7be3b328038585">isOpened</a>()) {</div><div class="line">        cerr &lt;&lt; <span class="stringliteral">"ERROR! Unable to open camera\n"</span>;</div><div class="line">        <span class="keywordflow">return</span> -1;</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="comment">//--- GRAB AND WRITE LOOP</span></div><div class="line">    cout &lt;&lt; <span class="stringliteral">"Start grabbing"</span> &lt;&lt; endl</div><div class="line">        &lt;&lt; <span class="stringliteral">"Press any key to terminate"</span> &lt;&lt; endl;</div><div class="line">    <span class="keywordflow">for</span> (;;)</div><div class="line">    {</div><div class="line">        <span class="comment">// wait for a new frame from camera and store it into 'frame'</span></div><div class="line">        cap.<a class="code" href="../../d8/dfe/classcv_1_1VideoCapture.html#a473055e77dd7faa4d26d686226b292c1">read</a>(frame);</div><div class="line">        <span class="comment">// check if we succeeded</span></div><div class="line">        <span class="keywordflow">if</span> (frame.<a class="code" href="../../d3/d63/classcv_1_1Mat.html#abbec3525a852e77998aba034813fded4">empty</a>()) {</div><div class="line">            cerr &lt;&lt; <span class="stringliteral">"ERROR! blank frame grabbed\n"</span>;</div><div class="line">            <span class="keywordflow">break</span>;</div><div class="line">        }</div><div class="line">        <span class="comment">// show live and wait for a key with timeout long enough to show images</span></div><div class="line">        <a class="code" href="../../d7/dfc/group__highgui.html#ga453d42fe4cb60e5723281a89973ee563">imshow</a>(<span class="stringliteral">"Live"</span>, frame);</div><div class="line">        <span class="keywordflow">if</span> (<a class="code" href="../../d7/dfc/group__highgui.html#ga5628525ad33f52eab17feebcfba38bd7">waitKey</a>(5) &gt;= 0)</div><div class="line">            <span class="keywordflow">break</span>;</div><div class="line">    }</div><div class="line">    <span class="comment">// the camera will be deinitialized automatically in VideoCapture destructor</span></div><div class="line">    <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>In <a class="el" href="../../dd/d01/group__videoio__c.html">C API</a> the black-box structure <code>CvCapture</code> is used instead of VideoCapture. </dd>
<dd>
<ul>
<li>(C++) A basic sample on using the VideoCapture interface can be found at <code>OPENCV_SOURCE_CODE/samples/cpp/videocapture_starter.cpp</code></li>
<li>(Python) A basic sample on using the VideoCapture interface can be found at <code>OPENCV_SOURCE_CODE/samples/python/video.py</code></li>
<li>(Python) A multi threaded video processing sample can be found at <code>OPENCV_SOURCE_CODE/samples/python/video_threaded.py</code></li>
<li>(Python) VideoCapture sample showcasing some features of the Video4Linux2 backend <code>OPENCV_SOURCE_CODE/samples/python/video_v4l2.py</code> </li>
</ul>
</dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d6/d7f/samples_2cpp_2camshiftdemo_8cpp-example.html#_a17">samples/cpp/camshiftdemo.cpp</a>, <a class="el" href="../../d4/d26/samples_2cpp_2facedetect_8cpp-example.html#_a4">samples/cpp/facedetect.cpp</a>, <a class="el" href="../../d6/ddf/samples_2cpp_2laplace_8cpp-example.html#_a1">samples/cpp/laplace.cpp</a>, <a class="el" href="../../d2/d1d/samples_2cpp_2lkdemo_8cpp-example.html#_a4">samples/cpp/lkdemo.cpp</a>, <a class="el" href="../../df/d54/samples_2cpp_2peopledetect_8cpp-example.html#_a20">samples/cpp/peopledetect.cpp</a>, <a class="el" href="../../d4/d35/samples_2cpp_2polar_transforms_8cpp-example.html#_a0">samples/cpp/polar_transforms.cpp</a>, <a class="el" href="../../d5/de8/samples_2cpp_2segment_objects_8cpp-example.html#_a15">samples/cpp/segment_objects.cpp</a>, <a class="el" href="../../d0/df8/samples_2cpp_2train_HOG_8cpp-example.html#_a38">samples/cpp/train_HOG.cpp</a>, <a class="el" href="../../d3/d9c/samples_2cpp_2tutorial_code_2videoio_2video-write_2video-write_8cpp-example.html#_a0">samples/cpp/tutorial_code/videoio/video-write/video-write.cpp</a>, <a class="el" href="../../df/d94/samples_2cpp_2videowriter_basic_8cpp-example.html#_a1">samples/cpp/videowriter_basic.cpp</a>, <a class="el" href="../../d9/d8d/samples_2dnn_2classification_8cpp-example.html#_a19">samples/dnn/classification.cpp</a>, <a class="el" href="../../d4/db9/samples_2dnn_2object_detection_8cpp-example.html#_a18">samples/dnn/object_detection.cpp</a>, <a class="el" href="../../d4/d88/samples_2dnn_2segmentation_8cpp-example.html#_a14">samples/dnn/segmentation.cpp</a>, <a class="el" href="../../db/da4/samples_2dnn_2text_detection_8cpp-example.html#_a11">samples/dnn/text_detection.cpp</a>, and <a class="el" href="../../d8/d61/samples_2tapi_2hog_8cpp-example.html#_a14">samples/tapi/hog.cpp</a>.</dd>
</dl></div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a57c0e81e83e60f36c83027dc2a188e80"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a57c0e81e83e60f36c83027dc2a188e80">◆ </a></span>VideoCapture() <span class="overload">[1/5]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::VideoCapture::VideoCapture </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>&lt;VideoCapture object&gt;</td><td>=</td><td>cv.VideoCapture(</td><td class="paramname"></td><td>)</td></tr><tr><td style="width: 20px;"></td><td>&lt;VideoCapture object&gt;</td><td>=</td><td>cv.VideoCapture(</td><td class="paramname">filename[, apiPreference]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>&lt;VideoCapture object&gt;</td><td>=</td><td>cv.VideoCapture(</td><td class="paramname">filename, apiPreference, params</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>&lt;VideoCapture object&gt;</td><td>=</td><td>cv.VideoCapture(</td><td class="paramname">index[, apiPreference]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>&lt;VideoCapture object&gt;</td><td>=</td><td>cv.VideoCapture(</td><td class="paramname">index, apiPreference, params</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Default constructor. </p>
<dl class="section note"><dt>Note</dt><dd>In <a class="el" href="../../dd/d01/group__videoio__c.html">C API</a>, when you finished working with video, release CvCapture structure with cvReleaseCapture(), or use Ptr&lt;CvCapture&gt; that calls cvReleaseCapture() automatically in the destructor. </dd></dl>
</div>
</div>
<a id="ac4107fb146a762454a8a87715d9b7c96"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac4107fb146a762454a8a87715d9b7c96">◆ </a></span>VideoCapture() <span class="overload">[2/5]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">cv::VideoCapture::VideoCapture </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>apiPreference</em> = <code><a class="el" href="../../d4/d15/group__videoio__flags__base.html#gga023786be1ee68a9105bf2e48c700294da77ab1fe260fd182f8ec7655fab27a31d">CAP_ANY</a></code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>&lt;VideoCapture object&gt;</td><td>=</td><td>cv.VideoCapture(</td><td class="paramname"></td><td>)</td></tr><tr><td style="width: 20px;"></td><td>&lt;VideoCapture object&gt;</td><td>=</td><td>cv.VideoCapture(</td><td class="paramname">filename[, apiPreference]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>&lt;VideoCapture object&gt;</td><td>=</td><td>cv.VideoCapture(</td><td class="paramname">filename, apiPreference, params</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>&lt;VideoCapture object&gt;</td><td>=</td><td>cv.VideoCapture(</td><td class="paramname">index[, apiPreference]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>&lt;VideoCapture object&gt;</td><td>=</td><td>cv.VideoCapture(</td><td class="paramname">index, apiPreference, params</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Opens a video file or a capturing device or an IP video stream for video capturing with API Preference. </p>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>it can be:<ul>
<li>name of video file (eg. <code>video.avi</code>)</li>
<li>or image sequence (eg. <code>img_%02d.jpg</code>, which will read samples like <code>img_00.jpg, img_01.jpg, img_02.jpg, ...</code>)</li>
<li>or URL of video stream (eg. <code>protocol://host:port/script_name?script_params|auth</code>)</li>
<li>or GStreamer pipeline string in gst-launch tool format in case if GStreamer is used as backend Note that each video stream or IP camera feed has its own URL scheme. Please refer to the documentation of source stream to know the right URL. </li>
</ul>
</td></tr>
    <tr><td class="paramname">apiPreference</td><td>preferred Capture API backends to use. Can be used to enforce a specific reader implementation if multiple are available: e.g. <a class="el" href="../../d4/d15/group__videoio__flags__base.html#gga023786be1ee68a9105bf2e48c700294dacf10e9692c4166f74de62b7d00c377d0" title="Open and record video file or stream using the FFMPEG library. ">cv::CAP_FFMPEG</a> or <a class="el" href="../../d4/d15/group__videoio__flags__base.html#gga023786be1ee68a9105bf2e48c700294dabe73da7a65e66cdd47c87733a4ea6ef0" title="OpenCV Image Sequence (e.g. img_%02d.jpg) ">cv::CAP_IMAGES</a> or <a class="el" href="../../d4/d15/group__videoio__flags__base.html#gga023786be1ee68a9105bf2e48c700294dab6ac3effa04f41ed5470375c85a23504" title="DirectShow (via videoInput) ">cv::CAP_DSHOW</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d4/d15/group__videoio__flags__base.html#ga023786be1ee68a9105bf2e48c700294d" title="cv::VideoCapture API backends identifier. ">cv::VideoCaptureAPIs</a> </dd></dl>
</div>
</div>
<a id="a31e7cf5ba9debaec15437a200b18241e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a31e7cf5ba9debaec15437a200b18241e">◆ </a></span>VideoCapture() <span class="overload">[3/5]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">cv::VideoCapture::VideoCapture </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>apiPreference</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; int &gt; &amp; </td>
          <td class="paramname"><em>params</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>&lt;VideoCapture object&gt;</td><td>=</td><td>cv.VideoCapture(</td><td class="paramname"></td><td>)</td></tr><tr><td style="width: 20px;"></td><td>&lt;VideoCapture object&gt;</td><td>=</td><td>cv.VideoCapture(</td><td class="paramname">filename[, apiPreference]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>&lt;VideoCapture object&gt;</td><td>=</td><td>cv.VideoCapture(</td><td class="paramname">filename, apiPreference, params</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>&lt;VideoCapture object&gt;</td><td>=</td><td>cv.VideoCapture(</td><td class="paramname">index[, apiPreference]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>&lt;VideoCapture object&gt;</td><td>=</td><td>cv.VideoCapture(</td><td class="paramname">index, apiPreference, params</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Opens a video file or a capturing device or an IP video stream for video capturing with API Preference and parameters. </p>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. The <code>params</code> parameter allows to specify extra parameters encoded as pairs <code>(paramId_1, paramValue_1, paramId_2, paramValue_2, ...)</code>. See <a class="el" href="../../d4/d15/group__videoio__flags__base.html#gaeb8dd9c89c10a5c63c139bf7c4f5704d" title="cv::VideoCapture generic properties identifier. ">cv::VideoCaptureProperties</a> </p>
</div>
</div>
<a id="aabce0d83aa0da9af802455e8cf5fd181"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aabce0d83aa0da9af802455e8cf5fd181">◆ </a></span>VideoCapture() <span class="overload">[4/5]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">cv::VideoCapture::VideoCapture </td>
          <td>(</td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>apiPreference</em> = <code><a class="el" href="../../d4/d15/group__videoio__flags__base.html#gga023786be1ee68a9105bf2e48c700294da77ab1fe260fd182f8ec7655fab27a31d">CAP_ANY</a></code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>&lt;VideoCapture object&gt;</td><td>=</td><td>cv.VideoCapture(</td><td class="paramname"></td><td>)</td></tr><tr><td style="width: 20px;"></td><td>&lt;VideoCapture object&gt;</td><td>=</td><td>cv.VideoCapture(</td><td class="paramname">filename[, apiPreference]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>&lt;VideoCapture object&gt;</td><td>=</td><td>cv.VideoCapture(</td><td class="paramname">filename, apiPreference, params</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>&lt;VideoCapture object&gt;</td><td>=</td><td>cv.VideoCapture(</td><td class="paramname">index[, apiPreference]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>&lt;VideoCapture object&gt;</td><td>=</td><td>cv.VideoCapture(</td><td class="paramname">index, apiPreference, params</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Opens a camera for video capturing. </p>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">index</td><td>id of the video capturing device to open. To open default camera using default backend just pass 0. (to backward compatibility usage of camera_id + domain_offset (CAP_*) is valid when apiPreference is CAP_ANY) </td></tr>
    <tr><td class="paramname">apiPreference</td><td>preferred Capture API backends to use. Can be used to enforce a specific reader implementation if multiple are available: e.g. <a class="el" href="../../d4/d15/group__videoio__flags__base.html#gga023786be1ee68a9105bf2e48c700294dab6ac3effa04f41ed5470375c85a23504" title="DirectShow (via videoInput) ">cv::CAP_DSHOW</a> or <a class="el" href="../../d4/d15/group__videoio__flags__base.html#gga023786be1ee68a9105bf2e48c700294da278d5ad4907c9c0fe6d1c6104b746019" title="Microsoft Media Foundation (via videoInput) ">cv::CAP_MSMF</a> or <a class="el" href="../../d4/d15/group__videoio__flags__base.html#gga023786be1ee68a9105bf2e48c700294da0c5f2eb9d2d43fb3582583203160a419" title="V4L/V4L2 capturing support. ">cv::CAP_V4L</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d4/d15/group__videoio__flags__base.html#ga023786be1ee68a9105bf2e48c700294d" title="cv::VideoCapture API backends identifier. ">cv::VideoCaptureAPIs</a> </dd></dl>
</div>
</div>
<a id="a708eea6c0dc7b57d04b27818ab8fc245"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a708eea6c0dc7b57d04b27818ab8fc245">◆ </a></span>VideoCapture() <span class="overload">[5/5]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">cv::VideoCapture::VideoCapture </td>
          <td>(</td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>apiPreference</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; int &gt; &amp; </td>
          <td class="paramname"><em>params</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>&lt;VideoCapture object&gt;</td><td>=</td><td>cv.VideoCapture(</td><td class="paramname"></td><td>)</td></tr><tr><td style="width: 20px;"></td><td>&lt;VideoCapture object&gt;</td><td>=</td><td>cv.VideoCapture(</td><td class="paramname">filename[, apiPreference]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>&lt;VideoCapture object&gt;</td><td>=</td><td>cv.VideoCapture(</td><td class="paramname">filename, apiPreference, params</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>&lt;VideoCapture object&gt;</td><td>=</td><td>cv.VideoCapture(</td><td class="paramname">index[, apiPreference]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>&lt;VideoCapture object&gt;</td><td>=</td><td>cv.VideoCapture(</td><td class="paramname">index, apiPreference, params</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Opens a camera for video capturing with API Preference and parameters. </p>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. The <code>params</code> parameter allows to specify extra parameters encoded as pairs <code>(paramId_1, paramValue_1, paramId_2, paramValue_2, ...)</code>. See <a class="el" href="../../d4/d15/group__videoio__flags__base.html#gaeb8dd9c89c10a5c63c139bf7c4f5704d" title="cv::VideoCapture generic properties identifier. ">cv::VideoCaptureProperties</a> </p>
</div>
</div>
<a id="ae82ac8efcff2c5c96be47c060754a518"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae82ac8efcff2c5c96be47c060754a518">◆ </a></span>~VideoCapture()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual cv::VideoCapture::~VideoCapture </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Default destructor. </p>
<p>The method first calls <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#afb4ab689e553ba2c8f0fec41b9344ae6" title="Closes video file or capturing device. ">VideoCapture::release</a> to close the already opened file or camera. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="aa6480e6972ef4c00d74814ec841a2939"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa6480e6972ef4c00d74814ec841a2939">◆ </a></span>get()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual double cv::VideoCapture::get </td>
          <td>(</td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>propId</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.VideoCapture.get(</td><td class="paramname">propId</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Returns the specified <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html" title="Class for video capturing from video files, image sequences or cameras. ">VideoCapture</a> property. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">propId</td><td>Property identifier from <a class="el" href="../../d4/d15/group__videoio__flags__base.html#gaeb8dd9c89c10a5c63c139bf7c4f5704d" title="cv::VideoCapture generic properties identifier. ">cv::VideoCaptureProperties</a> (eg. <a class="el" href="../../d4/d15/group__videoio__flags__base.html#ggaeb8dd9c89c10a5c63c139bf7c4f5704da7c2fa550ba270713fca1405397b90ae0" title="Current position of the video file in milliseconds. ">cv::CAP_PROP_POS_MSEC</a>, <a class="el" href="../../d4/d15/group__videoio__flags__base.html#ggaeb8dd9c89c10a5c63c139bf7c4f5704da6223452891755166a4fd5173ea257068" title="0-based index of the frame to be decoded/captured next. ">cv::CAP_PROP_POS_FRAMES</a>, ...) or one from <a class="el" href="../../dc/dfc/group__videoio__flags__others.html">Additional flags for video I/O API backends</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Value for the specified property. Value 0 is returned when querying a property that is not supported by the backend used by the <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html" title="Class for video capturing from video files, image sequences or cameras. ">VideoCapture</a> instance.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Reading / writing properties involves many layers. Some unexpected result might happens along this chain. <div class="fragment"><div class="line"><a class="code" href="../../d8/dfe/classcv_1_1VideoCapture.html#a57c0e81e83e60f36c83027dc2a188e80">VideoCapture</a> -&gt; API <a class="code" href="../../d6/d0f/group__dnn.html#ga186f7d9bfacac8b0ff2e26e2eab02625">Backend</a> -&gt; Operating System -&gt; Device Driver -&gt; Device Hardware</div></div><!-- fragment --> The returned value might be different from what really used by the device or it could be encoded using device dependent rules (eg. steps or percentage). Effective behaviour depends from device driver and API Backend </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d6/ddf/samples_2cpp_2laplace_8cpp-example.html#a6">samples/cpp/laplace.cpp</a>, and <a class="el" href="../../d3/d9c/samples_2cpp_2tutorial_code_2videoio_2video-write_2video-write_8cpp-example.html#a2">samples/cpp/tutorial_code/videoio/video-write/video-write.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="a4576e03f447abfdbd602c0809824ec03"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4576e03f447abfdbd602c0809824ec03">◆ </a></span>getBackendName()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> cv::VideoCapture::getBackendName </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.VideoCapture.getBackendName(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Returns used backend API name. </p>
<dl class="section note"><dt>Note</dt><dd>Stream should be opened. </dd></dl>
</div>
</div>
<a id="ac6e896380f408975cfc26d1931b95070"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac6e896380f408975cfc26d1931b95070">◆ </a></span>getExceptionMode()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool cv::VideoCapture::getExceptionMode </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.VideoCapture.getExceptionMode(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
<p>query if exception mode is active </p>
</div>
</div>
<a id="ae38c2a053d39d6b20c9c649e08ff0146"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae38c2a053d39d6b20c9c649e08ff0146">◆ </a></span>grab()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool cv::VideoCapture::grab </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.VideoCapture.grab(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Grabs the next frame from video file or capturing device. </p>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> (non-zero) in the case of success.</dd></dl>
<p>The method/function grabs the next frame from video file or camera and returns true (non-zero) in the case of success.</p>
<p>The primary use of the function is in multi-camera environments, especially when the cameras do not have hardware synchronization. That is, you call <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#ae38c2a053d39d6b20c9c649e08ff0146" title="Grabs the next frame from video file or capturing device. ">VideoCapture::grab()</a> for each camera and after that call the slower method <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#a9ac7f4b1cdfe624663478568486e6712" title="Decodes and returns the grabbed video frame. ">VideoCapture::retrieve()</a> to decode and get frame from each camera. This way the overhead on demosaicing or motion jpeg decompression etc. is eliminated and the retrieved frames from different cameras will be closer in time.</p>
<p>Also, when a connected camera is multi-head (for example, a stereo camera or a Kinect device), the correct way of retrieving data from it is to call <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#ae38c2a053d39d6b20c9c649e08ff0146" title="Grabs the next frame from video file or capturing device. ">VideoCapture::grab()</a> first and then call <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#a9ac7f4b1cdfe624663478568486e6712" title="Decodes and returns the grabbed video frame. ">VideoCapture::retrieve()</a> one or more times with different values of the channel parameter.</p>
<p><a class="el" href="../../d7/d6f/tutorial_kinect_openni.html">Using Kinect and other OpenNI compatible depth sensors</a> </p>
</div>
</div>
<a id="a9d2ca36789e7fcfe7a7be3b328038585"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9d2ca36789e7fcfe7a7be3b328038585">◆ </a></span>isOpened()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool cv::VideoCapture::isOpened </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.VideoCapture.isOpened(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Returns true if video capturing has been initialized already. </p>
<p>If the previous call to <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html" title="Class for video capturing from video files, image sequences or cameras. ">VideoCapture</a> constructor or <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#a614a1702e15f42ede5100014ce7f48ed" title="Opens a video file or a capturing device or an IP video stream for video capturing. ">VideoCapture::open()</a> succeeded, the method returns true. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d6/d7f/samples_2cpp_2camshiftdemo_8cpp-example.html#a22">samples/cpp/camshiftdemo.cpp</a>, <a class="el" href="../../d4/d26/samples_2cpp_2facedetect_8cpp-example.html#a17">samples/cpp/facedetect.cpp</a>, <a class="el" href="../../d6/ddf/samples_2cpp_2laplace_8cpp-example.html#a5">samples/cpp/laplace.cpp</a>, <a class="el" href="../../d2/d1d/samples_2cpp_2lkdemo_8cpp-example.html#a12">samples/cpp/lkdemo.cpp</a>, <a class="el" href="../../df/d54/samples_2cpp_2peopledetect_8cpp-example.html#a23">samples/cpp/peopledetect.cpp</a>, <a class="el" href="../../d4/d35/samples_2cpp_2polar_transforms_8cpp-example.html#a8">samples/cpp/polar_transforms.cpp</a>, <a class="el" href="../../d5/de8/samples_2cpp_2segment_objects_8cpp-example.html#a21">samples/cpp/segment_objects.cpp</a>, <a class="el" href="../../d0/df8/samples_2cpp_2train_HOG_8cpp-example.html#a42">samples/cpp/train_HOG.cpp</a>, <a class="el" href="../../d3/d9c/samples_2cpp_2tutorial_code_2videoio_2video-write_2video-write_8cpp-example.html#a1">samples/cpp/tutorial_code/videoio/video-write/video-write.cpp</a>, <a class="el" href="../../df/d94/samples_2cpp_2videowriter_basic_8cpp-example.html#a2">samples/cpp/videowriter_basic.cpp</a>, and <a class="el" href="../../d8/d61/samples_2tapi_2hog_8cpp-example.html#a17">samples/tapi/hog.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="a614a1702e15f42ede5100014ce7f48ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a614a1702e15f42ede5100014ce7f48ed">◆ </a></span>open() <span class="overload">[1/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool cv::VideoCapture::open </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>apiPreference</em> = <code><a class="el" href="../../d4/d15/group__videoio__flags__base.html#gga023786be1ee68a9105bf2e48c700294da77ab1fe260fd182f8ec7655fab27a31d">CAP_ANY</a></code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.VideoCapture.open(</td><td class="paramname">filename[, apiPreference]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.VideoCapture.open(</td><td class="paramname">filename, apiPreference, params</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.VideoCapture.open(</td><td class="paramname">index[, apiPreference]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.VideoCapture.open(</td><td class="paramname">index, apiPreference, params</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Opens a video file or a capturing device or an IP video stream for video capturing. </p>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.</p>
<p>Parameters are same as the constructor <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html" title="Class for video capturing from video files, image sequences or cameras. ">VideoCapture</a>(const String&amp; filename, int apiPreference = CAP_ANY) </p><dl class="section return"><dt>Returns</dt><dd><code>true</code> if the file has been successfully opened</dd></dl>
<p>The method first calls <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#afb4ab689e553ba2c8f0fec41b9344ae6" title="Closes video file or capturing device. ">VideoCapture::release</a> to close the already opened file or camera. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d6/d7f/samples_2cpp_2camshiftdemo_8cpp-example.html#a21">samples/cpp/camshiftdemo.cpp</a>, <a class="el" href="../../d4/d26/samples_2cpp_2facedetect_8cpp-example.html#a13">samples/cpp/facedetect.cpp</a>, <a class="el" href="../../d6/ddf/samples_2cpp_2laplace_8cpp-example.html#a3">samples/cpp/laplace.cpp</a>, <a class="el" href="../../d2/d1d/samples_2cpp_2lkdemo_8cpp-example.html#a11">samples/cpp/lkdemo.cpp</a>, <a class="el" href="../../df/d54/samples_2cpp_2peopledetect_8cpp-example.html#a21">samples/cpp/peopledetect.cpp</a>, <a class="el" href="../../d4/d35/samples_2cpp_2polar_transforms_8cpp-example.html#a6">samples/cpp/polar_transforms.cpp</a>, <a class="el" href="../../d5/de8/samples_2cpp_2segment_objects_8cpp-example.html#a19">samples/cpp/segment_objects.cpp</a>, <a class="el" href="../../d0/df8/samples_2cpp_2train_HOG_8cpp-example.html#a39">samples/cpp/train_HOG.cpp</a>, <a class="el" href="../../d9/d8d/samples_2dnn_2classification_8cpp-example.html#a20">samples/dnn/classification.cpp</a>, <a class="el" href="../../d4/db9/samples_2dnn_2object_detection_8cpp-example.html#a19">samples/dnn/object_detection.cpp</a>, <a class="el" href="../../d4/d88/samples_2dnn_2segmentation_8cpp-example.html#a15">samples/dnn/segmentation.cpp</a>, <a class="el" href="../../db/da4/samples_2dnn_2text_detection_8cpp-example.html#a12">samples/dnn/text_detection.cpp</a>, and <a class="el" href="../../d8/d61/samples_2tapi_2hog_8cpp-example.html#a16">samples/tapi/hog.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="ac9e6045e168938b82bfc5ed0164e0481"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac9e6045e168938b82bfc5ed0164e0481">◆ </a></span>open() <span class="overload">[2/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool cv::VideoCapture::open </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>apiPreference</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; int &gt; &amp; </td>
          <td class="paramname"><em>params</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.VideoCapture.open(</td><td class="paramname">filename[, apiPreference]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.VideoCapture.open(</td><td class="paramname">filename, apiPreference, params</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.VideoCapture.open(</td><td class="paramname">index[, apiPreference]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.VideoCapture.open(</td><td class="paramname">index, apiPreference, params</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Opens a camera for video capturing. </p>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.</p>
<p>The <code>params</code> parameter allows to specify extra parameters encoded as pairs <code>(paramId_1, paramValue_1, paramId_2, paramValue_2, ...)</code>. See <a class="el" href="../../d4/d15/group__videoio__flags__base.html#gaeb8dd9c89c10a5c63c139bf7c4f5704d" title="cv::VideoCapture generic properties identifier. ">cv::VideoCaptureProperties</a></p>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if the file has been successfully opened</dd></dl>
<p>The method first calls <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#afb4ab689e553ba2c8f0fec41b9344ae6" title="Closes video file or capturing device. ">VideoCapture::release</a> to close the already opened file or camera. </p>
</div>
</div>
<a id="a49e87ea8665f471b76a48c0a6c537fb7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a49e87ea8665f471b76a48c0a6c537fb7">◆ </a></span>open() <span class="overload">[3/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool cv::VideoCapture::open </td>
          <td>(</td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>apiPreference</em> = <code><a class="el" href="../../d4/d15/group__videoio__flags__base.html#gga023786be1ee68a9105bf2e48c700294da77ab1fe260fd182f8ec7655fab27a31d">CAP_ANY</a></code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.VideoCapture.open(</td><td class="paramname">filename[, apiPreference]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.VideoCapture.open(</td><td class="paramname">filename, apiPreference, params</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.VideoCapture.open(</td><td class="paramname">index[, apiPreference]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.VideoCapture.open(</td><td class="paramname">index, apiPreference, params</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Opens a camera for video capturing. </p>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.</p>
<p>Parameters are same as the constructor <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html" title="Class for video capturing from video files, image sequences or cameras. ">VideoCapture</a>(int index, int apiPreference = CAP_ANY) </p><dl class="section return"><dt>Returns</dt><dd><code>true</code> if the camera has been successfully opened.</dd></dl>
<p>The method first calls <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#afb4ab689e553ba2c8f0fec41b9344ae6" title="Closes video file or capturing device. ">VideoCapture::release</a> to close the already opened file or camera. </p>
</div>
</div>
<a id="a10867868137c2d142aac30a0648d00fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a10867868137c2d142aac30a0648d00fe">◆ </a></span>open() <span class="overload">[4/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool cv::VideoCapture::open </td>
          <td>(</td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>apiPreference</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; int &gt; &amp; </td>
          <td class="paramname"><em>params</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.VideoCapture.open(</td><td class="paramname">filename[, apiPreference]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.VideoCapture.open(</td><td class="paramname">filename, apiPreference, params</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.VideoCapture.open(</td><td class="paramname">index[, apiPreference]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.VideoCapture.open(</td><td class="paramname">index, apiPreference, params</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Returns true if video capturing has been initialized already. </p>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.</p>
<p>The <code>params</code> parameter allows to specify extra parameters encoded as pairs <code>(paramId_1, paramValue_1, paramId_2, paramValue_2, ...)</code>. See <a class="el" href="../../d4/d15/group__videoio__flags__base.html#gaeb8dd9c89c10a5c63c139bf7c4f5704d" title="cv::VideoCapture generic properties identifier. ">cv::VideoCaptureProperties</a></p>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if the camera has been successfully opened.</dd></dl>
<p>The method first calls <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#afb4ab689e553ba2c8f0fec41b9344ae6" title="Closes video file or capturing device. ">VideoCapture::release</a> to close the already opened file or camera. </p>
</div>
</div>
<a id="a199844fb74226a28b3ce3a39d1ff6765"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a199844fb74226a28b3ce3a39d1ff6765">◆ </a></span>operator&gt;&gt;() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html">VideoCapture</a>&amp; cv::VideoCapture::operator&gt;&gt; </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp; </td>
          <td class="paramname"><em>image</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Stream operator to read the next video frame. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#a473055e77dd7faa4d26d686226b292c1" title="Grabs, decodes and returns the next video frame. ">read()</a> </dd></dl>
</div>
</div>
<a id="a35eb427f16b4ea5c502922aba9da835c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a35eb427f16b4ea5c502922aba9da835c">◆ </a></span>operator&gt;&gt;() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html">VideoCapture</a>&amp; cv::VideoCapture::operator&gt;&gt; </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d7/d45/classcv_1_1UMat.html">UMat</a> &amp; </td>
          <td class="paramname"><em>image</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#a473055e77dd7faa4d26d686226b292c1" title="Grabs, decodes and returns the next video frame. ">read()</a> </dd></dl>
</div>
</div>
<a id="a473055e77dd7faa4d26d686226b292c1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a473055e77dd7faa4d26d686226b292c1">◆ </a></span>read()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool cv::VideoCapture::read </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>image</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval, image</td><td>=</td><td>cv.VideoCapture.read(</td><td class="paramname">[, image]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Grabs, decodes and returns the next video frame. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">image</td><td>the video frame is returned here. If no frames has been grabbed the image will be empty. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>false</code> if no frames has been grabbed</dd></dl>
<p>The method/function combines <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#ae38c2a053d39d6b20c9c649e08ff0146" title="Grabs the next frame from video file or capturing device. ">VideoCapture::grab()</a> and <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#a9ac7f4b1cdfe624663478568486e6712" title="Decodes and returns the grabbed video frame. ">VideoCapture::retrieve()</a> in one call. This is the most convenient method for reading video files or capturing data from decode and returns the just grabbed frame. If no frames has been grabbed (camera has been disconnected, or there are no more frames in video file), the method returns false and the function returns empty image (with cv::Mat, test it with <a class="el" href="../../d3/d63/classcv_1_1Mat.html#abbec3525a852e77998aba034813fded4" title="Returns true if the array has no elements. ">Mat::empty()</a>).</p>
<dl class="section note"><dt>Note</dt><dd>In <a class="el" href="../../dd/d01/group__videoio__c.html">C API</a>, functions cvRetrieveFrame() and cv.RetrieveFrame() return image stored inside the video capturing structure. It is not allowed to modify or release the image! You can copy the frame using cvCloneImage and then do whatever you want with the copy. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../df/d94/samples_2cpp_2videowriter_basic_8cpp-example.html#a8">samples/cpp/videowriter_basic.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="afb4ab689e553ba2c8f0fec41b9344ae6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afb4ab689e553ba2c8f0fec41b9344ae6">◆ </a></span>release()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void cv::VideoCapture::release </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.VideoCapture.release(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Closes video file or capturing device. </p>
<p>The method is automatically called by subsequent <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#a614a1702e15f42ede5100014ce7f48ed" title="Opens a video file or a capturing device or an IP video stream for video capturing. ">VideoCapture::open</a> and by <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html" title="Class for video capturing from video files, image sequences or cameras. ">VideoCapture</a> destructor.</p>
<p>The C function also deallocates memory and clears *capture pointer. </p>
</div>
</div>
<a id="a9ac7f4b1cdfe624663478568486e6712"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9ac7f4b1cdfe624663478568486e6712">◆ </a></span>retrieve()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool cv::VideoCapture::retrieve </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>image</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>flag</em> = <code>0</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval, image</td><td>=</td><td>cv.VideoCapture.retrieve(</td><td class="paramname">[, image[, flag]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Decodes and returns the grabbed video frame. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">image</td><td>the video frame is returned here. If no frames has been grabbed the image will be empty. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">flag</td><td>it could be a frame index or a driver specific flag </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>false</code> if no frames has been grabbed</dd></dl>
<p>The method decodes and returns the just grabbed frame. If no frames has been grabbed (camera has been disconnected, or there are no more frames in video file), the method returns false and the function returns an empty image (with cv::Mat, test it with <a class="el" href="../../d3/d63/classcv_1_1Mat.html#abbec3525a852e77998aba034813fded4" title="Returns true if the array has no elements. ">Mat::empty()</a>).</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#a473055e77dd7faa4d26d686226b292c1" title="Grabs, decodes and returns the next video frame. ">read()</a></dd></dl>
<dl class="section note"><dt>Note</dt><dd>In <a class="el" href="../../dd/d01/group__videoio__c.html">C API</a>, functions cvRetrieveFrame() and cv.RetrieveFrame() return image stored inside the video capturing structure. It is not allowed to modify or release the image! You can copy the frame using cvCloneImage and then do whatever you want with the copy. </dd></dl>
</div>
</div>
<a id="a8c6d8c2d37505b5ca61ffd4bb54e9a7c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8c6d8c2d37505b5ca61ffd4bb54e9a7c">◆ </a></span>set()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool cv::VideoCapture::set </td>
          <td>(</td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>propId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>value</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.VideoCapture.set(</td><td class="paramname">propId, value</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Sets a property in the <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html" title="Class for video capturing from video files, image sequences or cameras. ">VideoCapture</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">propId</td><td>Property identifier from <a class="el" href="../../d4/d15/group__videoio__flags__base.html#gaeb8dd9c89c10a5c63c139bf7c4f5704d" title="cv::VideoCapture generic properties identifier. ">cv::VideoCaptureProperties</a> (eg. <a class="el" href="../../d4/d15/group__videoio__flags__base.html#ggaeb8dd9c89c10a5c63c139bf7c4f5704da7c2fa550ba270713fca1405397b90ae0" title="Current position of the video file in milliseconds. ">cv::CAP_PROP_POS_MSEC</a>, <a class="el" href="../../d4/d15/group__videoio__flags__base.html#ggaeb8dd9c89c10a5c63c139bf7c4f5704da6223452891755166a4fd5173ea257068" title="0-based index of the frame to be decoded/captured next. ">cv::CAP_PROP_POS_FRAMES</a>, ...) or one from <a class="el" href="../../dc/dfc/group__videoio__flags__others.html">Additional flags for video I/O API backends</a> </td></tr>
    <tr><td class="paramname">value</td><td>Value of the property. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if the property is supported by backend used by the <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html" title="Class for video capturing from video files, image sequences or cameras. ">VideoCapture</a> instance. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Even if it returns <code>true</code> this doesn't ensure that the property value has been accepted by the capture device. See note in <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#aa6480e6972ef4c00d74814ec841a2939" title="Returns the specified VideoCapture property. ">VideoCapture::get()</a> </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d6/ddf/samples_2cpp_2laplace_8cpp-example.html#a13">samples/cpp/laplace.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="afcab97adfa090883dce5523e9ebcb995"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afcab97adfa090883dce5523e9ebcb995">◆ </a></span>setExceptionMode()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void cv::VideoCapture::setExceptionMode </td>
          <td>(</td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>enable</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.VideoCapture.setExceptionMode(</td><td class="paramname">enable</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Switches exceptions mode</p>
<p>methods raise exceptions if not successful instead of returning an error code </p>
</div>
</div>
<a id="ade1c7b8d276fea4d000bc0af0f1017b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ade1c7b8d276fea4d000bc0af0f1017b3">◆ </a></span>waitAny()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool cv::VideoCapture::waitAny </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html">VideoCapture</a> &gt; &amp; </td>
          <td class="paramname"><em>streams</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; int &gt; &amp; </td>
          <td class="paramname"><em>readyIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga7cde0074dfd288f2d70c0e035dacb28a">int64</a> </td>
          <td class="paramname"><em>timeoutNs</em> = <code>0</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Wait for ready frames from <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html" title="Class for video capturing from video files, image sequences or cameras. ">VideoCapture</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">streams</td><td>input video streams </td></tr>
    <tr><td class="paramname">readyIndex</td><td>stream indexes with grabbed frames (ready to use .<a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#a9ac7f4b1cdfe624663478568486e6712" title="Decodes and returns the grabbed video frame. ">retrieve()</a> to fetch actual frame) </td></tr>
    <tr><td class="paramname">timeoutNs</td><td>number of nanoseconds (0 - infinite) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if streamReady is not empty</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="../../d1/dee/classcv_1_1Exception.html" title="Class passed to an error. ">Exception</a></td><td>Exception on stream errors (check .<a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#a9d2ca36789e7fcfe7a7be3b328038585" title="Returns true if video capturing has been initialized already. ">isOpened()</a> to filter out malformed streams) or <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html" title="Class for video capturing from video files, image sequences or cameras. ">VideoCapture</a> type is not supported</td></tr>
  </table>
  </dd>
</dl>
<p>The primary use of the function is in multi-camera environments. The method fills the ready state vector, grabs video frame, if camera is ready.</p>
<p>After this call use <a class="el" href="../../d8/dfe/classcv_1_1VideoCapture.html#a9ac7f4b1cdfe624663478568486e6712" title="Decodes and returns the grabbed video frame. ">VideoCapture::retrieve()</a> to decode and fetch frame data. </p>
</div>
</div>
<h2 class="groupheader">Friends And Related Function Documentation</h2>
<a id="af1de3913d3e916106e718ebdf190f76e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af1de3913d3e916106e718ebdf190f76e">◆ </a></span>internal::VideoCapturePrivateAccessor</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">friend class internal::VideoCapturePrivateAccessor</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a8c6d7b52a28206072d540c9567874649"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8c6d7b52a28206072d540c9567874649">◆ </a></span>cap</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt;<a class="el" href="../../dc/d3d/videoio_8hpp.html#a394109074fab9bdca2ea45514b1946b7">CvCapture</a>&gt; cv::VideoCapture::cap</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ad20c1542d32a3dfef0a083bede8b956a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad20c1542d32a3dfef0a083bede8b956a">◆ </a></span>icap</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt;IVideoCapture&gt; cv::VideoCapture::icap</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a8eb39d3c09569c6afe3dc9ef19253219"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8eb39d3c09569c6afe3dc9ef19253219">◆ </a></span>throwOnFail</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool cv::VideoCapture::throwOnFail</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>opencv2/<a class="el" href="../../dc/d3d/videoio_8hpp.html">videoio.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:43 for OpenCV by  <a href="http://www.doxygen.org/index.html">
<img alt="doxygen" class="footer" src="../../doxygen.png"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
